﻿#include <stdio.h>
#include "QLinkLib.h"

int main(int argc, char* argv[])
{
	int ret = RET_OK;
	if (argc == 1) {
		QINFO info;
		ret = qget(&info);
		printf("\ntype:%s (0x%.4x)\n", info.type, info.id);
		printf("flash:%uKB sram:%uKB\n", 
			(uint32_t)(info.sflash / 1024), 
			(uint32_t)(info.ssram / 1024));
	}
	else {
		ret = qwrites(argv[1], argc==3? argv[2]:"0x08000000");
	}
	printf("\n执行结果 %d\n", ret);
	return ret;
}

